package com.yue.rpc.loadbalance;

import com.yue.rpc.extension.SPI;
import com.yue.rpc.remoting.dto.RpcRequest;

import java.util.List;

/**
 * @Author zhangqiyue
 * @Description 负载均衡策略接口
 * @Date 2023/3/4 15:56
 */
@SPI
public interface LoadBalance {
    /**
     * @description: 根据负载均衡策略从现有服务地址中选择
     * @author: zhangqiyue
     * @date: 2023/3/4 15:58
     * @param:
     * @return:
     **/
    String selectServiceAddress(List<String> serviceUrlList, RpcRequest rpcRequest);
}
